<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>[title]</title>
    <link href="__STATIC__/css/bootstrap.css" rel="stylesheet">

    <link href="__STATIC__/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="__STATIC__/css/style.css">
</head>

<body>

<div id="wrapper">
    <!-- Sidebar -->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <span style="line-height:50px;background:#dc3545;padding:5px 10px;color:white;"><a href="/" target=_blank style="color:white;font-size:12px;"><i class="fa fa-home"></i> 网站首页</a> </span>
           <span style="line-height:50px;background:#dc3545;padding:5px 10px;color:white;margin-left:10px;"><a href='javascript:clear_cache()' style="color:white;font-size:12px;"><i class="fa fa-trash"></i>  清空缓存</a>
            <a class="navbar-brand" href="{:U('index/index')}">系统管理后台</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-ex1-collapse">

            <include file="Public/sidebar" />

            <ul class="nav navbar-nav navbar-right navbar-user">
                <li class="dropdown user-dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> 你好,{:session('username')} <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="/admin.php?m=Admin&c=member&a=update&id={:session('adminId')}"><i class="fa fa-gear"></i> 设置</a></li>
                        
                        <li class="divider"></li>
                        <li><a href="{:U('login/logout')}"><i class="fa fa-power-off"></i> 退出</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </nav>
    
    <script>
       function clear_cache(){
           $.ajax({
              url:'{:U("index/clear_cache")}',
              success:function(data){
                 if(data == 1){
                    alert('清理成功!');
                 }else{
                    alert('清理失败，请稍后重试!');
                 }
              }
           })
       }
    </script>